//
//  ZFMyBasicInfoModal.m
//  HappilyLoan
//
//  Created by zainishenbian on 2017/4/13.
//  Copyright © 2017年 zongqingxiangqian. All rights reserved.
//

#import "ZFMyBasicInfoModal.h"

@implementation ZFMyBasicInfoModal
+ (instancetype)getMyBasicInfoDictionary:(NSDictionary *)dict
{
    ZFMyBasicInfoModal *modal = [ZFMyBasicInfoModal new];
    
    modal.socialInfoModal = [ZFUserSocialInfomodal getUserSocialInfoDictionary:dict[@"basic_info"]];
    modal.financelInfoModal = [ZFFinancelInfoModal getFinancelInfoDictionary:dict[@"finance_info"]];
    if (dict[@"job_info"] != [NSNull null]) {
        
        modal.professionInfoModal = [ZFUserProfessionInfoModal getUserProfessionInfoDictionary:dict[@"job_info"]];
    }
    
    modal.contactArray = [NSMutableArray new];
    for (NSDictionary *contactDic in dict[@"urgent_info_list"]) {
        
        ZFContactInfoModal *contactModal = [ZFContactInfoModal getContactInfoDictionary:contactDic];
        
        [modal.contactArray addObject:contactModal];
    }
    
    return modal;
}
@end
